//
// Created by fanghr on 17-12-28.
//

#ifndef PROJECT_CAM_REQ_PACK_H
#define PROJECT_CAM_REQ_PACK_H

#include "../include.h"

class cam_req_pack {
public:
    struct table_t {
        friend class boost::serialization::access;

        bool with_cam_disparity,
                with_cam_original_Mat,
                with_cam_gesture,
                with_cam_frame,
                with_cam_cameraInfo;

        template<class Archive>
        void serialize(Archive &ar, const unsigned int) {
            ar & with_cam_disparity &
            with_cam_original_Mat &
            with_cam_gesture &
            with_cam_frame &
            with_cam_cameraInfo;
        }
    };

private:
    friend class boost::serialization::access;

    table_t table;

    template<class Archive>
    void serialize(Archive &ar, const unsigned int) {
        ar & table;
    }

public:
    cam_req_pack() {}

    cam_req_pack(bool with_cam_disparity,
                 bool with_cam_original_Mat,
                 bool with_cam_gesture,
                 bool with_cam_frame, bool with_cam_cameraInfo) {
        table.with_cam_disparity = with_cam_disparity;
        table.with_cam_original_Mat = with_cam_original_Mat;
        table.with_cam_gesture = with_cam_gesture;
        table.with_cam_frame = with_cam_frame;
        table.with_cam_cameraInfo = with_cam_cameraInfo;
    }

    table_t get() {
        return table;
    }
};


#endif //PROJECT_CAM_REQ_PACK_H
